import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver

// Place your Spring DSL code here
beans = {

    // 防止hibernate session报错
    openSessionInViewFilter(org.springframework.orm.hibernate4.support.OpenSessionInViewFilter) {}

    // 为了安全起见，模板文件建议放到WEB-INF下面
    freeMarkerConfigurer(com.system.FreeMarkerConfigExtend) {
        templateLoaderPath = "/WEB-INF/templates/"
        defaultEncoding = "utf-8"
        freemarkerSettings=[
                "date_format":"yyyy-MM-dd"
                ,"datetime_format":"yyyy-MM-dd HH:mm:ss"
                ,"time_format":"HH:mm:ss"
                ,"number_format":"0.######"
                ,"boolean_format":"true,false"
                ,"url_escaping_charset":"UTF-8"
        ]
    }

    viewResolver(FreeMarkerViewResolver) {
        cache = false
        prefix = "bin/freemarker"
        suffix = ".ftl"
        exposeSpringMacroHelpers = true
    }
}